package com.comp7940.groupf.tgbot.util;

import java.util.Random;

public class CodeUtil {
    private static final String CHAR_SET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

    public static String generateVerificationCode() {

        Random random = new Random();
        StringBuilder verificationCode = new StringBuilder();
        for (int i = 0; i < 11; i++) {
            int number = random.nextInt(CHAR_SET.length());
            verificationCode.append(CHAR_SET.charAt(number));
        }
        return verificationCode.toString();
    }
}
